<tagLib name="html" />
<include file="Public:header" />
<script type="text/javascript">
	//新增用户
	function newUser(){
		var name = document.getElementById('id_name');
		if(name.value.length==0){
			document.getElementById('id_p_error').innerHTML = '用户名不可为空！';
			name.focus();
			return false;
		}
		if(document.getElementById('id_psw').value.length==0){
			document.getElementById('id_p_error').innerHTML = '密码不可为空！';
			document.getElementById('id_psw').focus();
			return false;
		}
		document.getElementById('id_true_psw').value = md5(document.getElementById('id_psw').value);
		document.getElementById('id_new_user_info_form').submit();
		return true;
	}
</script>
<div class="con_box right">
  <div class="u_content">
    <div class="con_tit"> 
      <ul class="left"><img src="../Public/images/jiao.gif"/></ul>
      <ul class="tit_bg">首页</ul> 
    </div>
    <div class="con_main left">          
           <div class="left con_admin">
              <div class="left con_admin"><h1>用户资料<a style="color:#ff5113;">新建</a></h1></div>
              <div class="ad_change">
                  <div class="change_box" >
                    <form id="id_new_user_info_form" action="http://{$_SERVER['HTTP_HOST']}/index.php/User/newUser" method="post">
                     <p><label>用户名：</label>
                     <present name="name">
                     	<input id="id_name" name="name" type="text" class="input1" value="{$name}"/>
                     <else/>
                     	<input id="id_name" name="name" type="text" class="input1" value=""/>
                     </present></p>
                     <p><label>真实姓名：</label>
                     <present name="true_name">
                     	<input id="id_true_name" name="true_name" type="text" class="input1" value="{$true_name}"/>
                     <else/>
                     	<input id="id_true_name" name="true_name" type="text" class="input1" value=""/>
                     </present></p>
                     <p><label>角色：</label>
	                     <input id="id_role3" name="role3" type="checkbox" class="input2" disabled="true" checked="true">客服
	                     <input id="id_role2" name="role2" type="checkbox" class="input2">客服管理员
	                     <input id="id_role1" name="role1" type="checkbox" class="input2">管理员
                     </p>
                     <p><label>密码：</label><input id="id_psw" name="psw" type="password" class="input1" /></p>
                     <p><label>邮箱：</label>
                     <present name="email">
                     	<input name="email" type="text" class="input1" value="{$email}"/>
                     <else/>
                     	<input name="email" type="text" class="input1" value=""/>
                     </present></p>
                     <p><label>备注：</label>
                     <present name="remark">
                     	<textarea name="remark">{$remark}</textarea>
                     <else/>
                     	<textarea name="remark"></textarea>
                     </present>
                     <input class="ci"  type="button" title="请确认信息" value="新&nbsp;&nbsp;&nbsp;建 " onclick="javascript:return newUser()"/>
                     <input id="id_true_psw" name="true_psw" type="hidden" value=""/>                     
                     </p>
                  </form>
                  <div><p id="id_p_error" class="p_error"><present name="msg">{$msg}</else></present></p></div>
                 </div>   
              </div> 
            </div>                    
    </div>     
  </div>
</div>
<tagLib name="html" />
<include file="Public:foot" />